package com.yuchengtech.simpleServer.servlet;

import com.yuchengtech.simpleServer.core.HttpRequest;
import com.yuchengtech.simpleServer.core.HttpResponse;
import com.yuchengtech.simpleServer.core.exception.SimpleServerException;

/**
 * in this server, the servlet is not singleton, it will create an servlet instance every time. 
 * @author Administrator
 *
 */
public abstract class SimpleServlet {

	boolean isDispached=false;
	
	public abstract void init() throws SimpleServerException;
	
	public abstract void service(HttpRequest request,HttpResponse response)  throws SimpleServerException;
	
	public abstract void destory()  throws SimpleServerException;
	
	//重定向
	public void dispatcherForward(HttpRequest request,HttpResponse response)  throws SimpleServerException
	{
		
		
	}
	
	
}
